package pojo;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;

/**
 * @author LiangHaiBo
 * @version 1.0
 * @date 2021.9.9 下午 23:13
 */
public class Order {
    /**
     * `  oid` varchar(32) NOT NULL,
     *   `ordertime` datetime DEFAULT NULL,
     *   `total` double DEFAULT NULL,
     *   `state` int DEFAULT NULL,
     *   `address` varchar(30) DEFAULT NULL,
     *   `name` varchar(20) DEFAULT NULL,
     *   `telephone` varchar(20) DEFAULT NULL,
     *   `uid` varchar(32) DEFAULT NULL,
     *
     */

    private String oid;//订单编号
    private Date ordertime;//订单时间
    private Double total;//订单总金额
    private int state = 0;//支付状态
    private String address;//收货地址
    private  String name;//姓名(收货人)
    private String telephone;//手机号码
    private User user;//(uid:那个用户买的)
    private List<OrderItem> items = new LinkedList<>();//订单中包含很多个订单项

    public String getOid() {
        return oid;
    }

    public void setOid(String oid) {
        this.oid = oid;
    }

    public Date getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(Date ordertime) {
        this.ordertime = ordertime;
    }

    public Double getTotal() {
        return total;
    }

    public void setTotal(Double total) {
        this.total = total;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<OrderItem> getItems() {
        return items;
    }

    public void setItems(List<OrderItem> items) {
        this.items = items;
    }
}
